﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NorthwindTableAdapters;

public partial class DataBinding : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int[] source = new int[] { 1, 2, 3, 4, 5 };
            DataList1.DataSource = source;
            DataList1.DataBind();
        }
    }

    protected void DataList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        //DataList1.DataBind();
    }
    protected void DataList1_EditCommand(object source, DataListCommandEventArgs e)
    {
        DataList1.EditItemIndex = e.Item.ItemIndex;
        //DataList1.DataBind();
    }
    protected void DataList1_UpdateCommand(object source, DataListCommandEventArgs e)
    {

    }
}